import requests
import re
import json

url = 'https://live.cdn.huya.com/livelist/game/tagLivelist?gameId=1663&tmpId=1341&callback=getLiveListJsonpCallback&page=1'

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'
}

resp = requests.get(url=url, headers=headers)
print(resp.text)

obj = re.compile('getLiveListJsonpCallback\((.*?)\)', re.S)
# print(re.findall(obj, resp.text))
js = re.findall(obj, resp.text)
# j = json.dumps(js)
for i in js:
    print(i, end='')
